<?php echo $header; ?>


		  <!-- Start - Left Side -->
	      <div id="left" class="span-24 ">
	      	<div id="account_history" class="span-24 checkout">
	    		<div class="heading_x span-24">
					<span><?php echo $heading_title; ?></span>
					<hr />
				</div>&nbsp;
	    		<?php foreach ($orders as $order) { ?>
    <div style="display: inline-block; margin-bottom: 10px; width: 100%;">
      <div style="width: 49%; float: left; margin-bottom: 2px;"><b><?php echo $text_order; ?></b> #<?php echo $order['order_id']; ?></div>
      <div style="width: 49%; float: right; margin-bottom: 2px; text-align: right;"><b><?php echo $text_status; ?></b> <?php echo $order['status']; ?></div>
      <div class="content" style="clear: both; padding: 5px;">
        <div style="padding: 5px;">
          <table width="100%">
          	<tr>
          		<td colspan="3"><span class="payment_status">
          			<?php
		  	  if($order['status']=="Pending"){echo "<a style=color:#da203d>".$text_pleasepay." &nbsp;&nbsp;&nbsp;";}
			  else if($order['status']=="User Make Payment"){echo "<a style=color:#0066b3>".$text_waitvalidate." &nbsp;&nbsp;&nbsp;";}
			  else if($order['status']=="Canceled"){echo "<a style=color:#da203d>".$text_cancel." &nbsp;&nbsp;&nbsp;";}
			  else { echo "<a style=color:green>".$text_paycomplete." &nbsp;&nbsp;&nbsp;";}
		  	?></span>
          		</td>
          	</tr>
            <tr>
              <td><?php echo $text_date_added; ?> <?php echo $order['date_added']; ?></td>
              <td><?php echo $text_customer; ?> <?php echo $order['name']; ?></td>
              <td rowspan="2" style="text-align: right;"><?php 
			  
			  
			  ?><a onclick="location = '<?php echo str_replace('&', '&amp;', $order['href']); ?>'" class="button">
			  	<?php   if($order['status']=="Pending"){ ?>
			  		<span><?php echo $button_pay; ?></span>
			  	<?php }else { ?>
			  		<span><?php echo $button_view; ?></span>
			  	<?php }?>
		  	</a><br/>
		  	
		  	
	  	</td>
            </tr>
            <tr>
              <td><?php echo $text_products; ?> <?php echo $order['products']; ?></td>
              <td><?php echo $text_total; ?> <?php echo $order['total']; ?></td>
            </tr>
			<tr>
          		<td colspan="3"><span class="payment_status">
          			<?php
		  	  if($order['shippeds']){foreach($order['shippeds'] as $shipped){
			  $pos = strpos($shipped, ']');
			  $shipped = substr($shipped,0,$pos+1);
			  echo $shipped;}}
			  
		  	?></span>
          		</td>
          	</tr>
          </table>
        </div>
      </div>
    </div>
    <?php } ?>
    <div class="pagination"><?php echo $pagination; ?></div>
    <div class="buttons">
    	
    	<div class="galib_btn1 float_right">
            		<a onclick="location = '<?php echo str_replace('&', '&amp;', $continue); ?>'"><span><?php echo $button_continue; ?></span></a>
        </div>
     	<div style="clear:both;"></div>
    </div>
  			</div> 
	      </div>
       	 <!-- End - Left Side -->
       	 
       	 


<?php echo $footer; ?> 

